package org.odst;

import java.util.List;
import java.util.Map;

import org.odst.controller.SheetCellFinder;


/**
 * @author Leonid Vysochyn
 */
public class MockSheetCellFinder implements SheetCellFinder {

    Map<String, List<String>> cellsMapping;

    public MockSheetCellFinder(Map<String, List<String>> cellsMapping) {
        this.cellsMapping = cellsMapping;
    }

    public List<String> findCell(String cellName) {
        return cellsMapping.get(cellName);
    }

    public List<String> findCell(int rowNum, int colNum) {
        org.odst.parser.CellReference cellReference = new org.odst.parser.CellReference(rowNum, colNum, false, false);
        return cellsMapping.get(cellReference.formatAsString());
    }

    public List<String> findCell(String sheetName, String cellName) {
        return cellsMapping.get(cellName);
    }

    public List<String> findCell(String sheetName, int rowNum, int colNum) {
        org.odst.parser.CellReference cellReference = new org.odst.parser.CellReference(rowNum, colNum, false, false);
        return cellsMapping.get(cellReference.formatAsString());
    }
}
